package com.cmbchina.encrypt;

/**
 * SM异常类
 *
 * @author liuxb
 * @date 2021/11/26 22:23
 */
public class SMCryptKYException extends RuntimeException {
    private String code;

    public SMCryptKYException() {
        super();
    }

    public SMCryptKYException(ErrorCode errorCode) {
        super(errorCode.getMessage());
        this.code = errorCode.getCode();
    }

    public SMCryptKYException(ErrorCode errorCode, String message) {
        super(message);
        this.code = errorCode.getCode();
    }

    public SMCryptKYException(ErrorCode errorCode, Throwable cause) {
        super(errorCode.getMessage(), cause);
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
